home *** CD-ROM | disk | FTP | other *** search
Wrap
global gFlagRotation, gGameCountries, gFlag, gCountY, gCountX, gRemove, gCount, gNumSelected, gSelectNum1X, gSelectNum1Y, gSelectNum2X, gSelectNum2Y, gSelectNum3X, gSelectNum3Y, gScore, gLevel, pAdd, gTimeLoop, gPaused on startMovie repeat with gRemove = 25 to 28 sprite(gRemove).ink = 4 end repeat repeat with gRemove = 36 to 91 sprite(gRemove).visible = 0 end repeat sprite(3).rewind() sprite(3).resume() gTimeLoop = 0 gNumSelected = 0 gScore = 0 member("score_text").text = string(gScore) gLevel = 1 member("level_text").text = string(gLevel) gGameCountries = [[1, 2, 3, 4], [5, 6, 1, 2], [3, 4, 5, 6], [1, 2, 4, 6]] gFlagRotation = [[0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3]] repeat with gCountY = 0 to 3 repeat with gCountX = 0 to 3 if gLevel = 1 then gFlag = random(6) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" end case else if gLevel = 2 then gFlag = random(9) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" end case else if gLevel = 3 then gFlag = random(12) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" 10: sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation" 11: sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation" 12: sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation" end case end if end if end if gGameCountries[gCountY + 1][gCountX + 1] = gFlag gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1 sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90 sprite(5 + gCountX + (gCountY * 4)).visible = 1 sprite(5 + gCountX + (gCountY * 4)).loc = point(194 + (gCountX * 109), 59 + (gCountY * 107)) end repeat end repeat startTimer() end on checkCombination if gNumSelected >= 3 then if (gGameCountries[gSelectNum1Y][gSelectNum1X] = gGameCountries[gSelectNum2Y][gSelectNum2X]) and (gGameCountries[gSelectNum1Y][gSelectNum1X] = gGameCountries[gSelectNum3Y][gSelectNum3X]) then gTimeLoop = the timer repeat while the timer < (gTimeLoop + 30) updateStage() end repeat puppetSound(1, "winSound") repeat with gRemove = 39 to 91 sprite(gRemove).visible = 0 end repeat repeat with gCountY = 0 to 3 repeat with gCountX = 0 to 3 if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then sprite(5 + gCountX + (gCountY * 4)).visible = 0 sprite(80 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 50 sprite(80 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 12 sprite(80 + pAdd).visible = 1 sprite(81 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 52 sprite(81 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 14 sprite(81 + pAdd).visible = 1 pAdd = pAdd + 2 end if end repeat end repeat pAdd = 0 gTimeLoop = the timer repeat while the timer < (gTimeLoop + 30) updateStage() end repeat repeat with gCountY = 0 to 3 repeat with gCountX = 0 to 3 gFlag = random(6) if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then if gLevel = 1 then gFlag = random(6) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" end case else if gLevel = 2 then gFlag = random(9) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" end case else if gLevel = 3 then gFlag = random(12) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" 10: sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation" 11: sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation" 12: sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation" end case end if end if end if gGameCountries[gCountY + 1][gCountX + 1] = gFlag gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1 sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90 sprite(5 + gCountX + (gCountY * 4)).visible = 1 end if end repeat end repeat gScore = gScore + 150 member("score_text").text = string(gScore) repeat with gCount = 5 to 20 sprite(gCount).pCurrentlySelected = 0 end repeat repeat with gRemove = 52 to 91 sprite(gRemove).visible = 0 end repeat gNumSelected = 0 else if (gGameCountries[gSelectNum1Y][gSelectNum1X] <= 3) and (gGameCountries[gSelectNum2Y][gSelectNum2X] <= 3) and (gGameCountries[gSelectNum3Y][gSelectNum3X] <= 3) and ((gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum2Y][gSelectNum2X]) and (gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum3Y][gSelectNum3X])) then startTimer() updateStage() repeat while the timer < 30 end repeat puppetSound(1, "winSound") repeat with gRemove = 39 to 91 sprite(gRemove).visible = 0 end repeat repeat with gCountY = 0 to 3 repeat with gCountX = 0 to 3 if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then sprite(5 + gCountX + (gCountY * 4)).visible = 0 sprite(86 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 44 sprite(86 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 10 sprite(86 + pAdd).visible = 1 sprite(87 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 46 sprite(87 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 12 sprite(87 + pAdd).visible = 1 pAdd = pAdd + 2 end if end repeat end repeat pAdd = 0 startTimer() updateStage() repeat while the timer < 30 end repeat repeat with gCountY = 0 to 3 repeat with gCountX = 0 to 3 gFlag = random(6) if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then if gLevel = 1 then gFlag = random(6) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" end case else if gLevel = 2 then gFlag = random(9) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" end case else if gLevel = 3 then gFlag = random(12) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" 10: sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation" 11: sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation" 12: sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation" end case end if end if end if gGameCountries[gCountY + 1][gCountX + 1] = gFlag gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1 sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90 sprite(5 + gCountX + (gCountY * 4)).visible = 1 end if end repeat end repeat gScore = gScore + 300 member("score_text").text = string(gScore) repeat with gCount = 5 to 20 sprite(gCount).pCurrentlySelected = 0 end repeat repeat with gRemove = 52 to 91 sprite(gRemove).visible = 0 end repeat sprite(3).rewind() gNumSelected = 0 startTimer() else if (gGameCountries[gSelectNum1Y][gSelectNum1X] > 3) and (gGameCountries[gSelectNum2Y][gSelectNum2X] > 3) and (gGameCountries[gSelectNum3Y][gSelectNum3X] > 3) and ((gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum2Y][gSelectNum2X]) and (gFlagRotation[gSelectNum1Y][gSelectNum1X] = gFlagRotation[gSelectNum3Y][gSelectNum3X])) then startTimer() updateStage() repeat while the timer < 30 end repeat puppetSound(1, "winSound") repeat with gRemove = 39 to 91 sprite(gRemove).visible = 0 end repeat repeat with gCountY = 0 to 3 repeat with gCountX = 0 to 3 if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then sprite(5 + gCountX + (gCountY * 4)).visible = 0 sprite(86 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 44 sprite(86 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 10 sprite(86 + pAdd).visible = 1 sprite(87 + pAdd).locH = sprite(5 + gCountX + (gCountY * 4)).locH - 46 sprite(87 + pAdd).locV = sprite(5 + gCountX + (gCountY * 4)).locV - 12 sprite(87 + pAdd).visible = 1 pAdd = pAdd + 2 end if end repeat end repeat pAdd = 0 startTimer() updateStage() repeat while the timer < 30 end repeat repeat with gCountY = 0 to 3 repeat with gCountX = 0 to 3 gFlag = random(6) if sprite(5 + gCountX + (gCountY * 4)).pCurrentlySelected = 1 then if gLevel = 1 then gFlag = random(6) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" end case else if gLevel = 2 then gFlag = random(9) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" end case else if gLevel = 3 then gFlag = random(12) case gFlag of 1: sprite(5 + gCountX + (gCountY * 4)).member = "us_flag_animation" 2: sprite(5 + gCountX + (gCountY * 4)).member = "can_flag_animation" 3: sprite(5 + gCountX + (gCountY * 4)).member = "mexico_flag_animation" 4: sprite(5 + gCountX + (gCountY * 4)).member = "uk_flag_animation" 5: sprite(5 + gCountX + (gCountY * 4)).member = "french_flag_animation" 6: sprite(5 + gCountX + (gCountY * 4)).member = "german_flag_animation" 7: sprite(5 + gCountX + (gCountY * 4)).member = "zimbabwe_flag_animation" 8: sprite(5 + gCountX + (gCountY * 4)).member = "sAfrica_flag_animation" 9: sprite(5 + gCountX + (gCountY * 4)).member = "Kenya_flag_animation" 10: sprite(5 + gCountX + (gCountY * 4)).member = "china_flag_animation" 11: sprite(5 + gCountX + (gCountY * 4)).member = "japan_flag_animation" 12: sprite(5 + gCountX + (gCountY * 4)).member = "sKorea_flag_animation" end case end if end if end if gGameCountries[gCountY + 1][gCountX + 1] = gFlag gFlagRotation[gCountY + 1][gCountX + 1] = random(4) - 1 sprite(5 + gCountX + (gCountY * 4)).rotation = gFlagRotation[gCountY + 1][gCountX + 1] * 90 sprite(5 + gCountX + (gCountY * 4)).visible = 1 end if end repeat end repeat gScore = gScore + 300 member("score_text").text = string(gScore) repeat with gCount = 5 to 20 sprite(gCount).pCurrentlySelected = 0 end repeat repeat with gRemove = 52 to 91 sprite(gRemove).visible = 0 end repeat sprite(3).rewind() gNumSelected = 0 startTimer() else gTimeLoop = the timer repeat while the timer < (gTimeLoop + 30) updateStage() end repeat puppetSound(1, "resetSound") repeat with gRemove = 39 to 91 sprite(gRemove).visible = 0 end repeat repeat with gCount = 5 to 20 sprite(gCount).pCurrentlySelected = 0 end repeat gNumSelected = 0 end if end if end if if gScore > (((gLevel - 1) * 1000) + (1500 * gLevel)) then gPaused = 1 member("LevelComplete_Score").text = "Level" && string(gLevel) && "Score:" & RETURN & RETURN & string(gScore) sprite(3).rewind() sprite(3).pause() gLevel = gLevel + 1 if gLevel <= 3 then go(5) else member("GameOverSpeech").text = "You Win!!!" go(12) end if end if end if end